package icu.thatyear.main.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * <p>
 * 菜单管理
 * </p>
 *
 * @author Cjy
 * @since 2024-12-06
 */
@Getter
@Setter
@TableName("tz_sys_menu")
@Schema(name = "TzSysMenu", description = "菜单管理")
public class TzSysMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "menu_id", type = IdType.AUTO)
    private Long menuId;

    @Schema(description = "父菜单ID，一级菜单为0")
    @TableField("parent_id")
    private Long parentId;

    @Schema(description = "菜单名称")
    @TableField("name")
    private String name;

    @Schema(description = "菜单URL")
    @TableField("url")
    private String url;

    @Schema(description = "授权(多个用逗号分隔，如：user:list,user:create)")
    @TableField("perms")
    private String perms;

    @Schema(description = "类型   0：目录   1：菜单   2：按钮")
    @TableField("type")
    private Integer type;

    @Schema(description = "菜单图标")
    @TableField("icon")
    private String icon;

    @Schema(description = "排序")
    @TableField("order_num")
    private Integer orderNum;
}
